/**
 *
 * The MIT License
 *
 * Copyright (c) 2009 Ben Suter. All rights reserved.
 *
 * Permission is hereby granted, free of charge, to any person obtaining a copy
 * of this software and associated documentation files (the "Software"), to deal
 * in the Software without restriction, including without limitation the rights
 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
 * copies of the Software, and to permit persons to whom the Software is
 * furnished to do so, subject to the following conditions:

 * The above copyright notice and this permission notice shall be included in
 * all copies or substantial portions of the Software.

 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
 * THE SOFTWARE.
 */
package org.macdadi.core.client.domain;

/**
 * @author Ben Suter <ben.suter@gmail.com>
 */
public class ValuedOption extends Option
{
    protected double value;
    protected double weightedValue;

    /**
     * Experts evaluate the impact of an option on each goal.
     * The value of an option is the sum of these impact ratings,
     * and may be negative, zero, or positive.
     * @return the value of this option, based on impact ratings
     */
    public double getValue()
    {
        return value;
    }

    public void setValue(double v)
    {
        this.value = v;
    }

    /**
     * The weighted value is similar to the value. The only difference
     * is that each impact is multiplied by the weight of the relevant goal,
     * which in turn is derived from the goal's preferences reported by
     * the stakeholders.
     * @return the value of this option, taking into account stakeholder preferences
     */
    public double getWeightedValue()
    {
        return weightedValue;
    }

    public void setWeightedValue(double wv)
    {
        this.weightedValue = wv;
    }
}
